<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link
      rel="stylesheet"
      href="../../../plugin/bootstrap/css/bootstrap.min.css"
    />
    <link
      rel="stylesheet"
      href="../../../plugin/bootstrap/dist/datepicker/datetimepicker.min.css"
    />
    <link
      rel="stylesheet"
      href="../../../plugin/bootstrap/dist/select/select.css"
    />
    <link rel="stylesheet" href="../../../plugin/layui/css/layui.css" />
    <link rel="stylesheet" href="../../../plugin/swiper/swiper.min.css" />
    <link rel="stylesheet" href="../../../css/common.css" />
    <link rel="stylesheet" href="../../../css/style.css" />
    <link rel="stylesheet" href="../../../css/animate.css" />
    <link rel="stylesheet" href="../../css/company.css" />
    <link rel="stylesheet" href="../../../css/fonts/iconfont.css" />

    <script type="text/javascript" src="../../../js/jquery.js"></script>
    <script
      type="text/javascript"
      src="../../../plugin/layui/layui.js"
    ></script>
    <script
      type="text/javascript"
      src="../../../plugin/webuploader/webuploader.min.js"
    ></script>
    <script type="text/javascript" src="../../../js/echarts.min.js"></script>
    <script
      type="text/javascript"
      src="../../../plugin/swiper/swiper.min.js"
    ></script>
    <script
      type="text/javascript"
      src="../../../plugin/bootstrap/js/amount.js"
    ></script>
    <script
      type="text/javascript"
      src="../../../plugin/bootstrap/js/bootstrap.min.js"
    ></script>
    <script
      type="text/javascript"
      src="../../../plugin/bootstrap/dist/select/select.js"
    ></script>
    <script
      type="text/javascript"
      src="../../../plugin/bootstrap/dist/datepicker/datetimepicker.min.js"
    ></script>
    <script
      type="text/javascript"
      src="../../../plugin/bootstrap/dist/dist_zh.js"
    ></script>
    <script type="text/javascript" src="../../../js/common.js"></script>
    <script type="text/javascript" src="../../js/company_common.js"></script>
  </head>
  <body class="child_body">
    <div class="searchBox comModal">
      <div class="searchBtnBox flex">
        <div class="flex-1 flex">
          <button
            type="button"
            class="btn btn-info btn-sm m-r-5"
            onclick="getParams()"
          >
            <!-- <span class="iconfont icon-search"></span> -->
            <span class="text">查询</span>
          </button>
          <button
            type="button"
            class="btn btn-default btn-sm m-r-10"
            onclick="resetSearch()"
          >
            <!-- <span class="iconfont icon-reset"></span> -->
            <span class="text">重置</span>
          </button>
        </div>
        <div>
          <button
            type="button"
            class="btn btn-info btn-sm"
            onclick="showForm()"
          >
            <!-- <span class="iconfont icon-add-thin"></span> -->
            <span class="text">新增</span>
          </button>
        </div>
      </div>
      <div class="totalView">
        <span>申请总金额（0.00元）</span><span>待复核金额（0.00元）</span>
        <span>待审核金额（0.00元）</span><span>待付款金额（0.00元）</span>
        <span>已付款金额（0.00元）</span><span>已驳回金额（0.00元）</span>
      </div>
      <div class="searchForm form-inline row show">
        <!-- <span class="searchFormClose iconfont icon-close-rs"></span> -->
        <div class="formItem col-md-4 flex">
          <label class="form-label">输入框</label>
          <div class="flex-1 comInputNumber">
            <input
              type="text"
              id="inputText"
              class="form-control"
              placeholder="请输入用户名"
            />
            <div class="inputNumberBox">
              <span class="s_number">0</span>/<span class="e_number">30</span>
            </div>
          </div>
        </div>
        <div class="formItem col-md-4 flex">
          <label class="form-label">下拉单选</label>
          <div class="flex-1">
            <div id="selectDemoTest" class="comSelectBox"></div>
          </div>
        </div>
        <div class="formItem col-md-4 flex">
          <label class="form-label">下拉多选</label>
          <div class="flex-1">
            <div id="muitSelectDemoTest" class="comSelectBox"></div>
          </div>
        </div>
        <div class="formItem col-md-4 flex">
          <label class="form-label">时间选择</label>
          <div class="flex-1" id="datetimepicker">
            <!-- <input
              class="form-control"
              
              placeholder="请选择时间"
            /> -->
          </div>
        </div>
        <div class="formItem col-md-4 flex">
          <label class="form-label">时间区间</label>
          <div class="flex-1 widthHalf flex items-center" id="dateRangePicker">
            <input
              class="flex-1 form-control"
              id="startTime"
              placeholder="起始时间"
            />
            <span class="p-l-r-5">至</span>
            <input
              class="flex-1 form-control"
              id="endTime"
              placeholder="结束时间"
            />
          </div>
        </div>
        <div class="formItem col-md-4 flex">
          <label class="form-label">开关</label>
          <div class="flex-1 widthHalf flex items-center">
            <div class="comSwitch switchRound off"></div>
          </div>
        </div>
        <div class="formItem col-md-4 flex">
          <label class="form-label">checkbox</label>
          <div class="flex-1">
            <div class="comCheckBox">
              <label class="checkbox-inline">
                <input type="checkbox" id="inlineCheckbox1" value="option1" />
                星期一
              </label>
              <label class="checkbox-inline">
                <input type="checkbox" id="inlineCheckbox2" value="option2" />
                星期二
              </label>
              <label class="checkbox-inline">
                <input type="checkbox" id="inlineCheckbox3" value="option3" />
                星期三
              </label>
            </div>
          </div>
        </div>
        <div class="formItem col-md-4 flex">
          <label class="form-label">radio</label>
          <div class="flex-1">
            <div class="comRadioBox">
              <label class="radio-inline">
                <input
                  type="radio"
                  name="inlineRadioOptions"
                  id="inlineRadio1"
                  value="option1"
                />
                不启用
              </label>
              <label class="radio-inline">
                <input
                  type="radio"
                  name="inlineRadioOptions"
                  id="inlineRadio2"
                  value="option2"
                />
                启用
              </label>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="comModal m-t-15 p-15">
      <div class="comTabList lineTab clearfix m-b-15">
        <div class="item active">全部</div>
        <div class="item">待审核</div>
        <div class="item">已审核</div>
        <div class="item">已完成</div>
      </div>
      <div class="totalSum m-b-0">
        <span class="text">统计</span><span class="text">订单(0条)</span
        ><span class="text">采购重量(0.000吨)</span
        ><span class="text">入库重量(0.000吨)</span
        ><span class="text">结算重量(0.000吨)</span
        ><span class="text">金额(0.00元)</span>
      </div>
      <div class="tableOperBox flex p-t-b-10">
        <div class="flex-1 flex items-center">
          <div class="text">
            <input type="checkbox" disabled />已选中<span class="red">0</span>条
          </div>
          <button
            type="button"
            id="buttonTips"
            class="m-l-10 btn btn-default-self btn-sm"
          >
            导出明细
          </button>
          <span
            id="iconTips"
            class="layui-icon layui-icon-question layui-comtip m-l-5"
          ></span>
        </div>
        <div>
          <div class="btn-group self-btn-group" role="group" aria-label="...">
            <button type="button" class="btn btn-default-self btn-sm active">
              单据视图
            </button>
            <button type="button" class="btn btn-default-self btn-sm">
              明细视图
            </button>
          </div>
          <div
            class="inline text m-l-10 curPointer"
            onclick="setColumnDialog()"
          >
            <span class="iconfont icon-settings"></span>列表设置
          </div>
        </div>
      </div>
      <table
        class="layui-hide"
        id="bootstrapTable"
        lay-filter="bootstrapTable"
      ></table>
    </div>
    <div class="common_modal m-t-15">
      <div class="title">
        <span class="title_text">树状列表</span>
      </div>
      <div class="">
        <table
          class="layui-hide"
          id="layuiTreeTable"
          lay-filter="treeTable"
        ></table>
      </div>
    </div>
    <div
      id="testSideForm"
      class="comapnySideForm hasFootBtn"
      style="width: 800px"
    >
      <div class="sideFormHead">
        <span class="headText">新增</span>
        <span
          class="closeSideForm iconfont icon-close-X"
          onclick="hideSideForm();"
        ></span>
      </div>
      <div class="myScroll">
        <div class="formModal sideFormModal">
          <div class="formHead flex">
            <div class="title flex-1">
              <span class="spanText">基础信息</span>
            </div>
            <div class="formHeadOper">
              <span
                class="operateView iconfont icon-more-right showMore"
              ></span>
            </div>
          </div>
          <div class="formBox">
            <div class="form-inline row">
              <div class="formItem col-md-6 flex">
                <label class="form-label w90">输入框</label>
                <div class="flex-1">
                  <input
                    type="text"
                    class="form-control"
                    placeholder="请输入用户名"
                  />
                </div>
              </div>
              <div class="formItem col-md-6 flex">
                <label class="form-label w90">日期</label>
                <div class="flex-1">
                  <div id="formDatePicker"></div>
                </div>
              </div>
              <div class="formItem col-md-6 flex">
                <label class="form-label w90">日期区间</label>
                <div class="flex-1">
                  <div id="formDateAreaPicker"></div>
                </div>
              </div>
              <div class="formItem col-md-6 flex">
                <label class="form-label w90">备注</label>
                <div class="flex-1">
                  <textarea
                    class="form-control"
                    placeholder="请输入用户名"
                  ></textarea>
                </div>
              </div>
              <div class="formItem col-md-12 flex">
                <label class="form-label w90">副文本</label>
                <div class="flex-1">
                  <div id="myEditer"></div>
                </div>
              </div>
              <div class="formItem col-md-12 flex">
                <label class="form-label w90">上传图片</label>
                <div class="flex-1">
                  <ul class="picListBox" id="myPicList">
                    <li class="item fileItem">
                      <span class="iconfont icon-add-wide"></span>
                      <input type="file" onchange="fileChange(this)" />
                    </li>
                  </ul>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="sideFootBtn text-right">
        <button class="btn btn-default m-r-15" onclick="hideSideForm();">
          取消
        </button>
        <button class="btn btn-info m-r-15" onclick="hideSideForm();">
          确认
        </button>
      </div>
    </div>
    <div id="columnDialog" class="modal fade" tabindex="-1" role="dialog">
      <div class="modal-dialog" role="document" style="width: 1000px">
        <div class="modal-content" style="width: 1000px">
          <div class="modal-header">
            <button
              type="button"
              class="close"
              data-dismiss="modal"
              aria-label="Close"
            >
              <span aria-hidden="true">&times;</span>
            </button>
            <h4 class="modal-title algin-center">自定义列</h4>
          </div>
          <div class="modal-body">
            <div class="columnsBox m-b-15">
              <div class="title">显示列</div>
              <ul id="sortable-1">
                <li class="default inline">Product 1</li>
                <li class="default inline">Product 2</li>
                <li class="default inline">Product 3</li>
                <li class="default inline">Product 4</li>
                <li class="default inline">Product 5</li>
                <li class="default inline">Product 6</li>
                <li class="default inline">Product 7</li>
                <li class="default inline">Product 8</li>
              </ul>
            </div>
            <div class="columnsBox">
              <div class="title">隐藏列</div>
              <ul id="sortable-2"></ul>
            </div>
          </div>
          <div class="modal-footer border0">
            <button
              type="button"
              class="cancel btn btn-default"
              data-dismiss="modal"
            >
              取消
            </button>
            <button
              type="button"
              class="confirm btn btn-info"
              onclick="getData()"
            >
              确认
            </button>
          </div>
        </div>
      </div>
    </div>
  </body>
  <script>
    $(function () {
      bindComEvent();
      $("#buttonTips").on("click", function () {
        var mes = $(this).data("text") || "测试tips";
        var id = $(this).attr("id");
        var index = $.layer.tips(mes, "#" + id, {
          tips: [2, "#409efe"],
        });
        console.log(index);
      });
      $("#iconTips").on("click", function () {
        var mes = $(this).data("text") || "测试tips";
        var id = $(this).attr("id");
        $.layer.tips(mes, "#" + id, {
          tips: [2, "#409efe"],
        });
      });
      layui
        .config({
          base: "/plugin/layui/",
        })
        .extend({
          treetable: "/treeTable",
        })
        .use(["treeTable"], function () {
          var treeTable = layui.treeTable;
          //文档地址
          //https://blog.csdn.net/qq_42374233/article/details/124288568
          var data = [
            {
              id: "1",
              name: "xxx",
              createTime: "2019/11/18 10:44:00",
              children: [
                {
                  id: "1_1",
                  name: "xxx",
                  createTime: "2019/11/18 10:44:00",
                  children: [
                    {
                      id: "1_1_1",
                      name: "yyy",
                      createTime: "2019/11/18 10:44:00",
                    },
                  ],
                },
              ],
            },
            {
              id: "2",
              name: "xxx",
              createTime: "2019/11/18 10:44:00",
              children: [
                {
                  id: "2_1",
                  name: "xxx",
                  state: 0,
                  createTime: "2019/11/18 10:44:00",
                  children: [
                    {
                      id: "2_1_1",
                      name: "yyy",
                      state: 0,
                      createTime: "2019/11/18 10:44:00",
                      children: [],
                    },
                  ],
                },
              ],
            },
          ];

          // 渲染表格
          var insTb = treeTable.render({
            elem: "#layuiTreeTable",
            data: data, // 数据
            tree: {
              iconIndex: 1, // 折叠图标显示在第几列
              getIcon: function (d) {
                if (d.haveChild) {
                  // 判断是否有子集
                  return ""; //'<i class="ew-tree-icon ew-tree-icon-folder"></i>
                } else {
                  return ""; //<i class="ew-tree-icon ew-tree-icon-file"></i>
                }
              },
            },

            cols: [
              { type: "checkbox" },
              { field: "id", title: "ID" },
              { field: "name", title: "name" },
              { field: "createTime", title: "创建时间" },
            ],
          });
        });
      $("#selectDemoTest").comSelect({
        mutiselect: false,
        data: [
          { name: "ceshi1", id: 111 },
          { name: "ceshi2", id: 222 },
        ],
      });
      $("#muitSelectDemoTest").comSelect({
        mutiselect: true,
        data: [
          { name: "ceshi1", id: 111 },
          { name: "ceshi2", id: 222 },
        ],
        pySearch: true,
        defaultVal: [111],
      });
      $(".nav-tabs li")
        .off("click")
        .on("click", function () {
          var status = $(this).data("status");
          console.log(status);
          $(this).addClass("active").siblings().removeClass("active");
        });
      var datePicker1 = $("#datetimepicker").datePicker({
        format: "date",
        dateType: "date",
      });
      // var datePicker2 = $("#dateRangePicker").initDatePicker({
      //   type: "datetime",
      //   range: ["#startTime", "#endTime"],
      // });
      // $("#datetimeArea").datetimepicker({
      //   language: "zh-CN",
      // });
      // 初始化表格,动态从服务器加载数据
      $.layuiTable({
        id: "bootstrapTable",
        done: bindTableEvent,
        cols: [
          //表头
          { type: "checkbox", fixed: "left" },
          {
            field: "id",
            title: "ID",
            width: 80,
            sort: true,
            fixed: "left",
            // totalRowText: "合计：",
          },
          { field: "username", title: "用户名", width: 80 },
          {
            field: "experience",
            title: "积分",
            sort: true,
            totalRow: true,
            width: "10%",
          },
          {
            field: "sex",
            title: "性别",
            sort: true,
            width: "10%",
            templet: function (d) {
              var _class = "blue";
              if (d.LAY_INDEX % 2 == 1) {
                _class = "gray";
              }
              return '<span class="mainColorBox ' + _class + '"></span>';
            },
          },
          {
            field: "score",
            title: "评分",
            sort: true,
            width: "10%",
            totalRow: "{{ parseInt(d.TOTAL_NUMS) }} 分",
            templet: function () {
              return '<div class="flex items-center fullHeight"><div class="comSwitch switchRound off"></div></div>';
            },
          },
          { field: "city", title: "城市" },
          { field: "sign", title: "签名" },
          { field: "classify", title: "职业" },
          {
            field: "wealth",
            title: "财富",
            width: 135,
            sort: true,
            totalRow: true,
          },
          {
            fixed: "right",
            title: "操作",
            width: 220,
            align: "center",
            //toolbar: "#barDemo",
            templet: function (row) {
              return initTableOper(row);
            },
          },
        ],
        data: [
          { username: "test1", id: 1001 },
          { username: "test2", id: 1002 },
        ],
        done: function (res, layuiTable) {
          addTotalRow("bootstrapTable", layuiTable);
        },
      });
      // setTimeout(() => {
      //   $.myAlert({
      //     message: "测试我的内同",
      //   });
      // }, 2000);
      $(".myTreeTable")
        .off("click", ".showMore")
        .on("click", ".showMore", function () {
          var tr = $(this).parents("tr");
          tr.toggleClass("open");
          if (tr.hasClass("open")) {
            tr.next().show();
          } else {
            tr.nextAll().hide().removeClass("open");
          }
        });
    });
    function getMySelect() {
      alert($("#searchSelectInput").getSelectValue());
    }
    function setMySelect() {
      $("#muitSelectDemoTest").data("selectdata", 111);
    }
    //新增一行
    function addTotalRow(tableId, layuiTable) {
      var $tablemain = $("div[lay-id='" + tableId + "']").find(
        ".layui-table-main"
      );
      var $fixleft = $("div[lay-id='" + tableId + "']").find(
        ".layui-table-fixed-l"
      );
      var $fixright = $("div[lay-id='" + tableId + "']").find(
        ".layui-table-fixed-r"
      );
      if ($tablemain.length) {
        var tr = $tablemain.find('tr[data-index="0"]');
        $tablemain.find('tr[data-index="0"]').before(
          `<tr class="">
              <td data-field="0" data-key="1-0-0" class="layui-table-col-special">
                <div class="layui-table-cell laytable-cell-1-0-0 laytable-cell-checkbox">
                  <input type="checkbox" name="layTableCheckbox" lay-skin="primary">
                  <div class="layui-unselect layui-form-checkbox" lay-skin="primary">
                    <i class="layui-icon layui-icon-ok"></i></div></div>
              </td>
              <td data-field="id" class="">
                <div class="layui-table-cell laytable-cell-1-0-1">1008</div>
              </td>
              <td data-field="username" class="">
                <div class="layui-table-cell">
                  5254
                </div>
              </td>
              <td data-field="experience" class="">
                <div class="layui-table-cell">545</div>
              </td>
              <td data-field="sex" data-content="" class="">
                <div class="layui-table-cell">
                 885989
                </div>
              </td>
              <td data-field="score" class="">
                <div class="layui-table-cell">
                  98855
                </div>
              </td>
              <td data-field="city" class="">
                <div class="layui-table-cell">33</div>
              </td>
              <td data-field="sign" class="">
                <div class="layui-table-cell">22</div>
              </td>
              <td data-field="classify" class="">
                <div class="layui-table-cell">12</div>
              </td>
              <td data-field="wealth" class="">
                <div class="layui-table-cell">ddd</div>
              </td>
              <td data-field="10">
                <div class="layui-table-cell">总计：1180</div>
              </td>
            </tr>`
        );
        // layuiTable.reload(tableId);
      }
    }
    function setColumnDialog() {
      $("#columnDialog").on("show.bs.modal", function () {
        // 拖拽排序
        var sortable1 = document.getElementById("sortable-1");
        var sortable2 = document.getElementById("sortable-2");
        var ops = {
          group: "shared",
          animation: 150,
        };
        //初始化
        var sortable1 = Sortable.create(sortable1, ops);
        var sortable2 = Sortable.create(sortable2, ops);
      });
      $("#columnDialog").modal("show");
    }
    function showColSet() {}
    //给组件 赋值
    function setDefaultVal() {
      $("#inputText").val("测试");
      //下拉选择赋值
      $("#selectTest").selectpicker("val", "1");
      $("#selectMulTest").selectpicker("val", [1, 2]);
      //日期赋值
      $("#datetimepicker").setDatePickeValue("2023-12-30 12:20");
      $("#comDateArea").setDatePickeValue([
        "2023-12-30 12:20",
        "2023-12-30 13:20",
      ]);
    }
    //search form取值
    function getParams() {
      var params = {};
      //输入框
      params.name = $("#inputText").val();
      //下拉选择
      params.select1 = $("#selectTest").selectpicker("val");
      params.select2 = $("#selectMulTest").selectpicker("val");
      //时间
      params.dateTime = $("#datetimepicker").getDatePickeValue();
      params.dateRange = $("#comDateArea").getDatePickeValue();
      console.log(params);
    }
    //重置
    function resetSearch() {
      $("#inputText").val("");
      //下拉选择清除
      $("#selectTest").selectpicker("val", "");
      $("#selectMulTest").selectpicker("val", "");
      //日期
      $("#datetimepicker").setDatePickeValue("");
      $("#comDateArea").setDatePickeValue([]);
    }
    //自定义操作
    function initTableOper(row) {
      var oper =
        '<div class="flex items-center layuiTableOper">' +
        '<div class="btn btn-xs btn-primary m-r-10 pwdReset" onclick="detailView(this)" title="重置密码" data-row=' +
        JSON.stringify(row) +
        '><i class="glyphicon glyphicon-pencil"></i></div>' +
        '<div class="btn btn-xs btn-success disableBtn m-r-10" onclick="opertShow(' +
        row.id +
        ')" title="禁用/启用">' +
        '<i class="glyphicon glyphicon-user"></i></div>' +
        '<div class="btn btn-xs btn-danger delBtn" title="删除">' +
        '<i class="glyphicon glyphicon-trash"></i></div>' +
        '<div class="moreOper tableMoreOper" title="更多">' +
        '<span class="btn btn-xs btn-default"><i class="iconfont icon-more-ellipsis"></i></span>' +
        '<ul class="tableOperList">' +
        '<li class="item" onclick="opertShow(' +
        row.id +
        ')">' +
        '<span class="iconfont icon-user m-r-10"></span>' +
        '<span class="text">操作2</span>' +
        "</li>" +
        '<li class="item border-top">' +
        '<span class="iconfont icon-exit m-r-10"></span>' +
        '<span class="text">操作1</span>' +
        "</li>" +
        "</ul>" +
        "</div></div>";
      return oper;
    }
    //事件绑定
    function bindTableEvent() {
      $(".comSwitch").length &&
        $(".comSwitch")
          .off("click")
          .on("click", function () {
            $(this).toggleClass("on");
            $(this).toggleClass("off");
          });
      //自定义绑定
      $(".layui-table-view[lay-id=bootstrapTable] .tableMoreOper").hover(
        function (event) {
          var offset = $(this).offset();
          console.log(event);
          var xPos =
            event.pageX - 140 - event.offsetX + $(event.currentTarget).width();
          var yPos = event.pageY + 22 - event.offsetY + 10; //10是padding-top的值
          $(this)
            .children("ul")
            .css({ left: xPos + "px", top: yPos + "px" })
            .show();
        },
        function () {
          $(this).children("ul").hide();
        }
      );
    }
    /*表格操作*/
    function detailView(obj) {
      var row = $(obj).data("row");
      alert(row.id);
    }
    function opertShow(id) {
      alert(id);
    }

    function operateFormatter(value, row, index) {
      //添加按钮
      var rows = JSON.stringify(row);
      // 根据传过来的参数添加不同的class
      var classED = "enabledE";
      var classEDVal;
      if (row.status == "启用") {
        classED = "enabledD";
        classEDVal = "禁用";
      } else {
        classED = "enabledE";
        classEDVal = "启用";
      }
      // onclick=modif(' + value + "," + rows + "," + index + ')
      return [
        // '<div class="flex justify-center">' +
        // <div class="btn btn-xs btn-primary m-r-10 pwdReset" title="重置密码" table-data=' +
        // //   rows +
        // ><i class="glyphicon glyphicon-pencil"></i></div>',
        // // '<div class="btn btn-xs btn-success disableBtn m-r-10" title="禁用/启用">' +
        // <i class="glyphicon glyphicon-user"></i></div>' +
        // <div class="btn btn-xs btn-danger delBtn m-r-10" title="删除">' +
        // <i class="glyphicon glyphicon-trash"></i></div>' +
        // <div class="moreOper" title="更多">' +
        // <span class="btn btn-xs btn-default"><i class="iconfont icon-more-ellipsis"></i></span>' +
        // <ul class="tableOperList">' +
        // <li class="item" onclick="changePassWord()">' +
        // <span class="iconfont icon-user m-r-10"></span>' +
        // <span class="text">操作2</span>' +
        //   "</li>" +
        // <li class="item border-top">' +
        // <span class="iconfont icon-exit m-r-10"></span>' +
        // <span class="text">操作1</span>' +
        //   "</li>" +
        //   "</ul>" +
        // //   "</div></div>",
        '<a href="javascript:;" class="link m-r-10">查看</a>' +
          '<a href="javascript:;" class="link m-r-10">导出通报函</a>' +
          '<a href="javascript:;" class="link m-r-10">上传通报函</a>' +
          '<a href="javascript:;" class="link dispath">派发</a>',
      ].join("");
    }
    function getSelection() {
      console.log($("#bootstrapTable").bootstrapTable("getAllSelections"));
    }
    function selectChange(obg) {}
    function showForm() {
      $("#testSideForm").fadeIn().css("right", "15px");
      //头部右侧展示更多
      $(".operateView")
        .off("click")
        .on("click", function () {
          if ($(this).hasClass("showMore")) {
            $(this).removeClass("showMore").addClass("hideMore");
          } else {
            $(this).removeClass("hideMore").addClass("showMore");
          }
          $(this).parents(".formHead").next(".formBox").fadeToggle();
        });
      //富文本销毁
      $("#myEditer").summernote("destroy");
      //初始化
      $("#myEditer").summernote({
        height: 300,
        width: "100%",
        tabsize: 2,
        placeholder: "请输入",
        lang: "zh-CN",
        callbacks: {
          onImageUpload: function (files) {
            sendFile(files);
          },
        },
      });
      //获取值
      //   $("#myEditer").summernote("code");
      //主动赋值
      $("#myEditer").summernote("code", "<h3>测试</h3>");
      $("#formDatePicker").datePicker({
        dateType: "date",
        format: "date",
      });
      $("#formDateAreaPicker").datePicker({
        dateType: "daterange",
        format: "date",
      });
    }
    function hideSideForm() {
      $("#testSideForm").fadeOut().css("right", "-50%");
    }
    function fileChange(e) {
      preview(e, "myPicList", true);
    }
    function fileUploadChange(e) {
      InitFileView(e, "fileUploadTest");
      $("#fileUploadTest .iconfont")
        .off("click")
        .on("click", function () {
          $(this).siblings(".name").text("");
          $(this).parent(".fileName").hide().siblings(".btn").show();
        });
    }
  </script>
</html>
